<div id="main">
<!--#include file="lib/col1.asp"-->
<!--#include file="lib/col2.asp"-->
  <div id="col3" role="main">
    <div id="col3_content" class="clearfix">
      <%if CheckEmployee() then%>
          <h3>公告和更新记录</h3>
          <%
            Set rs = Server.CreateObject("ADODB.Recordset")
            sql = "SELECT *  FROM ul where ul_post=0 or ( ul_post=1 and ul_date>=dateadd('d',-2,date())) order by ul_date desc,ul_post asc,id desc"
            rs.Open sql,conn,1,1
            str=""
            t_date=""
            do while not rs.eof
              select case rs("ul_post")
                case 0 ul_post="系统"
                case 1 ul_post="同步"
              end select
              if rs("ul_date")<>t_date then 
                t_post=-1
                if t_date<>"" then str=str&"</ul></div>"
                str=str&"<div><h4>"&rs("ul_date")&"</h4><ul>"
                t_date=rs("ul_date")
              end if
              if rs("ul_post")<>t_post then
                if t_post<>-1 then str=str&"</ol></li>"
                str=str&"<li>"&ul_post&"<ol>"
                t_post=rs("ul_post")
              end if
              str=str&"<li>"&rs("ul_cont")&"</li>"
              rs.movenext
            loop
            str=str&"</ol></li></ul></div>"
            response.write(str)
            rs.close
            set rs=nothing
          %>
      <%end if%>
    </div>
  </div>
</div>
